package controller;

import entity.Goods;
import service.impl.GoodsServiceImpl;

public class GoodsController {
	private GoodsServiceImpl gsi = new GoodsServiceImpl();
	
	public boolean save(Goods goods) {
		return gsi.save(goods);
	}

	public boolean delete(Goods goods) {
		return gsi.delete(goods);
	}

	public boolean update(Goods goods) {
		return gsi.update(goods);
	}

	public Goods selectById(int id) {
		return gsi.selectById(id);
	}

	public Goods[] selectAll() {
		return gsi.selectAll();
	}

	public boolean sale(Goods goods) {
		return gsi.sale(goods);
	}

	public Goods[] selectByName(String name) {
		return gsi.selectByName(name);
	}

	public Goods[] selectByPrice(double low, double high) {
		return gsi.selectByPrice(low, high);
	}

	public Goods[] selectAllNoStates() {
		return gsi.selectAllNoStates();
	}

	public Goods[] sortByAmountDesc() {
		return gsi.sortByAmountDesc();
	}
}
